-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Genesis upgrade and add invariant cherry pick #1081
Genesis upgrade and add invariant cherry pick #1081
Conversation
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1081 +/- ##
==========================================
+ Coverage 20.64% 20.75% +0.11%
==========================================
Files 193 194 +1
Lines 25270 25318 +48
==========================================
+ Hits 5218 5256 +38
- Misses 19096 19102 +6
- Partials 956 960 +4
Continue to review full report at Codecov.
|
func (h Hooks) AfterValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, infractionHeight int64, slashFactor sdk.Dec, effectiveSlashFactor sdk.Dec) { | ||
if slashFactor.IsZero() { | ||
return | ||
} | ||
h.k.RefreshIntermediaryDelegationAmounts(ctx) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't backport this PR due to this change. We do need to get the export genesis changes onto v7.x though. Eugen can you make a PR to v7.x with the import / export genesis changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I'll just have the bot open that PR, and we just comment out these lines
// { | ||
// "with single validator and multiple superfluid delegations", | ||
// []stakingtypes.BondStatus{stakingtypes.Bonded}, | ||
// 2, | ||
// []superfluidDelegation{{0, 0, 0, 1000000}, {1, 0, 0, 1000000}}, | ||
// []int64{0}, | ||
// []int64{0, 1}, | ||
// }, | ||
// { | ||
// "with multiple validators and multiple superfluid delegations with single validator slash", | ||
// []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, | ||
// 2, | ||
// []superfluidDelegation{{0, 0, 0, 1000000}, {1, 1, 0, 1000000}}, | ||
// []int64{0}, | ||
// []int64{0}, | ||
// }, | ||
// { | ||
// "with multiple validators and multiple superfluid delegations with two validators slash", | ||
// []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, | ||
// 2, | ||
// []superfluidDelegation{{0, 0, 0, 1000000}, {1, 1, 0, 1000000}}, | ||
// []int64{0, 1}, | ||
// []int64{0, 1}, | ||
// }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to fix these tests in an upcoming PR
* add TotalSuperfluidDelegationInvariant * update invariant name * Update x/superfluid/keeper/invariants.go Co-authored-by: Dev Ojha <[email protected]> * Update x/superfluid/keeper/invariants.go Co-authored-by: Dev Ojha <[email protected]> * revert back changes for SetLockIdIntermediaryAccountConnection * convert to round * add invariant checker function call on all superfluid tests * update go mod/sum * add after validator slashed hook * following updates for main branch cherry-pick Co-authored-by: Dev Ojha <[email protected]> (cherry picked from commit a454116) # Conflicts: # go.sum # x/superfluid/keeper/slash_test.go
* Genesis upgrade and add invariant cherry pick (#1081) * add TotalSuperfluidDelegationInvariant * update invariant name * Update x/superfluid/keeper/invariants.go Co-authored-by: Dev Ojha <[email protected]> * Update x/superfluid/keeper/invariants.go Co-authored-by: Dev Ojha <[email protected]> * revert back changes for SetLockIdIntermediaryAccountConnection * convert to round * add invariant checker function call on all superfluid tests * update go mod/sum * add after validator slashed hook * following updates for main branch cherry-pick Co-authored-by: Dev Ojha <[email protected]> (cherry picked from commit a454116) # Conflicts: # go.sum # x/superfluid/keeper/slash_test.go * resolve conflicts Co-authored-by: antstalepresh <[email protected]> Co-authored-by: antstalepresh <[email protected]>
Closes: #XXX
Description
For contributor use:
docs/
) or specification (x/<module>/spec/
)Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorer